#ifndef FOUNDATION_DBMS_CHANNEL_H
#define FOUNDATION_DBMS_CHANNEL_H
#include "dbms.h"
#include <vector>

namespace dbms {
class DbmsChannel : public Dbms<DeviceChannel_t> {
public:
	DbmsChannel(const std::string &dbFile);
	void Save(const DeviceChannel_t &dc);
	void Get(std::function<void(const DeviceChannel_t &dc)> onGet);
	std::vector<DeviceChannel_t> Get();

protected:
	virtual std::string Serialize(const DeviceChannel_t &t) override;
	virtual DeviceChannel_t Deserialize(const std::string &data) override;
};
} // namespace dbms

#endif